<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" >
   $(function(){
	   $("input[type='button']").click(function(){
		   var tr =$(this).parent("td").parent("tr");
		   var td_list=$(this).parent("td").siblings("td");
		   var tdval
		   td_list.each(function(index, element) {
            console.log("参数"+(index+1)+":"+$(this).text());
			   
           });
		   
		   /*alert(td_list.eq(1).text())*/
		   
		   //alert(td_list.text());
		  
		   
		 tr.html("<td><input id="6" type="text" >"+td_list.eq(0).text()+"</input></td><td>"+td_list.eq(1).text()+"</td><td><input type='button' value = '保存'/></td>")
		   })
	   })


</script>

</head>

<body>


	 <table align="center" border="1">
		<tr>
			<td style="visibility: hidden;">部门名称</td>
			<td>优先级</td>
			<td align="center">编辑</td>
			<td>编辑</td>
		</tr>
		
		<tr id= "1" display="none">
		    <td >1</td>
		    <td>1</td>
		    <!--方法二 POST传参-->
		    <td><input type="button" id="delTr" value="修改" />
		</tr>
		<tr id= "2" >
		    <td> 2</td>
		    <td>5 </td>
		    <!--方法二 POST传参-->
		    <td><input type="button" value = "修改" id="3"   />
		</tr>
	</table> 
 
</body></html>
